import React, { useState, useEffect } from 'react'
import { View, Image } from '@tarojs/components'
import { AtTabs, AtTabsPane } from 'taro-ui'
import BusinessContent from '../../../compontents/businessContent'
import ActiveContent from '../../../compontents/activeContent'
import NewsContent from '../../../compontents/newsContent'

import './index.less'
import "taro-ui/dist/style/components/tabs.scss";

export default (props: any) => {
  const [current,setCurrent] = useState(0)
  const handleClick=(v)=>{
    setCurrent(v)
  }
  return (
    <View className='Tab'>
      <AtTabs
        // animated={false}
        current={current}
        tabList={[
          // { title: 'U选商家' },
          { title: '校园活动' },
          { title: '校园广场' }
        ]}
        onClick={handleClick}>
        {/* <AtTabsPane current={current} index={0} >
          <View>
            <BusinessContent title={''}/>
          </View>
        </AtTabsPane> */}
        <AtTabsPane current={current} index={0}>
          <View>
          <ActiveContent title={''}/>
          </View>
        </AtTabsPane>
        <AtTabsPane current={current} index={1}>
          <View>
          <NewsContent  title={''}/>
          </View>
        </AtTabsPane>
      </AtTabs>
    </View>
  );
};
